static struct proc_dir_entry *dom_list_intf;
unsigned long direct_mmap(unsigned long, unsigned long, pgprot_t, int);
-int direct_unmap(unsigned long, unsigned long);
+int direct_unmap(struct mm_struct *, unsigned long, unsigned long);
static ssize_t dom_usage_read(struct file * file, char * buff, size_t size, loff_t * off)
{
if (copy_from_user(&argbuf, (void *)data, sizeof(argbuf)))
return -EFAULT;
- return direct_disc_unmap(argbuf.vaddr, argbuf.start_pfn,
- argbuf.tot_pages);
+ return direct_unmap(current->mm, argbuf.vaddr,
+ argbuf.tot_pages << PAGE_SIZE);
}
static int dom0_cmd_ioctl(struct inode *inode, struct file *file,
}
/* Note: this is only safe if the mm semaphore is held when called. */
-int direct_remap_page_range(unsigned long from, unsigned long phys_addr, unsigned long size, pgprot_t prot)
+static int direct_remap_page_range(unsigned long from, unsigned long phys_addr, unsigned long size, pgprot_t prot)
{
int error = 0;
pgd_t * dir;
* used for remapping discontiguous bits of domain's memory, pages to map are
* found from frame table beginning at the given first_pg index
*/
-int direct_remap_disc_page_range(unsigned long from,
- unsigned long first_pg, int tot_pages, pgprot_t prot)
+static int direct_remap_disc_page_range(unsigned long from,
+ unsigned long first_pg, int tot_pages, pgprot_t prot)
{
dom0_op_t dom0_op;
unsigned long *pfns = (unsigned long *)get_free_page(GFP_KERNEL);
/*
* remove user pages in a given range.
*/
-void direct_zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long size)
+static void direct_zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long size)
{
mmu_gather_t *tlb;
pgd_t * dir;